##安装k8s1.18.0-00
#1. 安装并配置docker
apt install -y docker.io
tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://hipzsnyz.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload
systemctl restart docker
docker --version
#docker版本Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2

#2. 安装k8s的kubeam等
apt install -y apt-transport-https
curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
EOF
apt update
apt install  kubectl=1.18.0-00 kubelet=1.18.0-00 kubeadm=1.18.0-00 -y
systemctl enable kubelet

#3. 启动k8s，可以参考另一个kubeStart.sh脚本

